﻿@inherits FeedbackComponent<EditInput<int?>, EditOutput<int>>
<Row Justify="space-between" Style="margin-bottom:20px;">
    <Col Span="8" Style="text-align:right;"><label class="ant-form-item-required">父级：</label></Col>
    <Col Span="16"><Cascader Size="large" Options="@_deptCascaderNodes" @bind-Value="_deptCascaderValue" ExpandTrigger="hover" ChangeOnSelect SelectedNodesChanged="CascaderOnChange" Style="width:100%"></Cascader></Col>
</Row>
@if (_editModel != null) 
{ 
<Form Loading="@_isLoading"
      Model="@_editModel"
      LabelCol="new ColLayoutParam { Span = 8 }"
      WrapperCol="new ColLayoutParam { Span = 16 }"
      OnFinish="OnFormFinish"
      Context="model">
    @*<FormItem Label="编号">
        <Input @bind-Value="@model.Id" Disabled />
    </FormItem>*@
    <FormItem Label="名称">
        <Input @bind-Value="@model.Name" />
    </FormItem>
    <FormItem Label="联系人">
        <Input @bind-Value="@model.Contacts" />
    </FormItem>
    <FormItem Label="电话	">
        <Input @bind-Value="@model.Tel" />
    </FormItem>
    <FormItem Label="排序">
        <AntDesign.InputNumber @bind-Value="@model.Order" />
    </FormItem>
    <FormItem Label="备注">
        <TextArea AutoSize="true" MinRows="2" MaxRows="6" @bind-Value="@model.Remark"></TextArea>
    </FormItem>
    <FormItem Label="是否锁定">
        <Switch @bind-Value="@model.IsLocked"></Switch>
    </FormItem>
    <FormItem WrapperCol="new ColLayoutParam { Offset = 4, Span = 20 }">
        <Button Type="@ButtonType.Primary" HtmlType="submit">
            保存
        </Button>
        <Button OnClick="_=>OnFormCancel()">
            取消
        </Button>
    </FormItem>
</Form>
}